<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8"/>
    <title>{$jerry.lang.opus_manage}</title>
    <hdjs/>
    <bootstrap/>
    <script type="text/javascript">
        $(function(){
            //判断编辑器是否为空
            $('#add-button').click(function() {
                var content = UE.getEditor('hd_content').getContentTxt();
                var content = $.trim(content);
                if(content){
                    return true;
                }
                alert('内容不能为空');
                return false;
               // 
            });
            
        })
    </script>
    <css file="__CONTROL_TPL__/css/css.css"/>
    <style type="text/css">
		.checkbox{
			 margin-left:5px;
			 width:90px;
			 margin-top: 10px;
		}
		textarea{
			width: 300px;
			height: 100px;
		}
    </style>
    <script type="text/javascript">
        $(function(){
            $('#add-cate-form').validate({
                'opus_title' : {
                    rule:{
                        required: true,
                        maxlen:20
                    },
                    error:{
                        required : '分类名称必填',
                        maxlen:'分类名称不能大于20个字符'
                    },
                    message:'分类名称长度 1 到 20 位',
                    success:'填写正确'
                },
            })
        })
    </script>
</head>
<body>
<div class="wrap">
    <div class="title-header">{$jerry.lang.add_opus}</div>
    <form action="" method="post" class="form-inline hd-form" id="add-arc" enctype="multipart/form-data">
        <table class="table1">
            <tr>
                <th class="w100">{$jerry.lang.title}</th>
                <td class="w100">
                    <input type="text" name="opus_title" class="w200"/> 
                </td>
                <td><span id="hd_opus_title"></span></td>
            </tr>
             <tr>
                <th class="w100">{$jerry.lang.pic}</th>
                <td>
                   <upload size='5' type='jpg,png,gif' limit='1' name='opus_thumb'/>
                </td>
                <td><span id="hd_opus_thumb"></span></td>
            </tr>
            <tr>
                <th class="w100">{$jerry.lang.author}</th>
                <td>
                    <input type="text" name="opus_author" class="w200" value="Jerry-chen"/>
                </td>
                <td></td>
            </tr>

            <tr>
                <th class="w100">{$jerry.lang.kind_category}</th>
                <td>
                    <select name="category_cid" class="w200">
                    	
                        <foreach from="$cateData" value="$v">
                            <option value="{$v.cid}">{$v._name}</option>
                        </foreach>
                    </select>
                </td>
                <td></td>
            </tr>
            <tr>
                <th class="w100">{$jerry.lang.develop_lang}</th>
                <td>
                    <select name="opus_lang" class="w200">
                        <option value="php">php</option>
                        <option value="Js">Js</option>
                        <option value="Html+css">Html+css</option>
                        
                        
                    </select>
                </td>
                <td></td>
            </tr>
            <tr>
                <th class="w100">{$jerry.lang.BrowseAddresses}</th>
                <td>
                    <input type="text" name="opus_seelink" class="w200" />
                </td>
                <td></td>
            </tr>
           <tr>
                <th class="w100">{$jerry.lang.Down_address}</th>
                <td>
                    <input type="text" name="opus_download" class="w200" />
                </td>
                <td></td>
            </tr>
            <tr>
                <th class="w100">{$jerry.lang.summary}</th>
                <td>
                	<ueditor  width='300' height='200' name='opus_digest' style="2"/>
                </td>
                <td></td>
            </tr>
           
            <tr>
                <th class="w100">{$jerry.lang.attr}</th>
                <td>
                	<label class="checkbox-inline">
						{$jerry.lang.hot}
						<input type="checkbox" value="{$jerry.lang.hot}" name="attr[]" class="check_input">
					</label>
					<label class="checkbox-inline">
						{$jerry.lang.top}
						<input type="checkbox" value="{$jerry.lang.top}" name="attr[]" class="check_input">
					</label>
					<label class="checkbox-inline">
						{$jerry.lang.recommend}
						<input type="checkbox" value="{$jerry.lang.recommend}" name="attr[]" class="check_input">
					</label>
					<label class="checkbox-inline">
						{$jerry.lang.image-text}
						<input type="checkbox" value="$jerry.lang.image-text}" name="attr[]" class="check_input">
					</label>
                </td>
                <td></td>
            </tr>
            <tr>
                <th class="w100">{$jerry.lang.tags}</th>
                <td>
                    <foreach from="$tagData" value="$v">
                        <label class="checkbox-inline">
                	   {$v.tagname}<input type="checkbox" name="tid[]" id="" value="{$v.tid}"/>
                       </label>
                    </foreach>
                </td>
                <td></td>
            </tr>
          <!--    <tr>
                <th class="w100">作品关键字</th>
                <td>
                    <textarea name="opus_keywords" id="" rows="10"></textarea>
                </td>
                <td></td>
            </tr>
             <tr>
                <th class="w100">作品描述</th>
                <td>
                    <textarea name="opus_description" id="" cols="30" rows="10"></textarea>
                </td>
                <td></td>
            </tr> -->
             <tr>
                <th class="w100">{$jerry.lang.opus_des}</th>
                <td>
                    <ueditor  width='650' height='800' name='opus_content'/>

                </td>

                <td><span id="hd_content"></span></td>
            </tr>
            <tr>
                <th class="w100"></th>
                <td></td>
                <td></td>
            </tr>
            <tr>
                <th class="w100"></th>
                <td></td>
                <td></td>
            </tr>
        
        </table>
        <div class="position-bottom">
            <input type="submit" class="hd-success" value="{$jerry.lang.add}" id="add-button"/>
        </div>
    </form>
</div>
</body>
</html>